from SyntaxDesc import *
import Register
def Syntax():
	return SyntaxDesc(
		Regex(gStyleMethodDef,
			'[a-zA-Z0-9][\t\n *&~]+\([0-9_a-zA-Z]+\)[\t ]*(', 1
		),
		Regex(gStyleMethodDef,
			'\(public:\|~\)[\t\n ]+\([0-9_a-zA-Z]+\)[\t ]*(', 2
		),
		Regex(CharStyle(eFacePlain),
			'\(return\|else\|new\)[\t\n ]+\([0-9_a-zA-Z]+\)[\t ]*(', 2
		),
		Words(gStyleStructKeyword,
			"if",
			"else",
			"while",
			"do",
			"for",
			"switch",
			"case",
			"default",
			"class",
			"struct",
			"union",
			"typedef",
			"enum",
			"return",
			"break",
			"continue",
			"template",
			"new",
			"delete",
			"protected",
			"private",
			"public",
			"inline",
			"static",
			"extern"
		),
		Regex(gStyleMacro,
			'%\([a-zA-Z]+\)', 1
		),
		Regex(gStyleClass,
			'\<class[\t ]+\([a-zA-Z]+\)[\n\t ]*[:{]', 1
		),
		Regex(gStyleString,
			'\(\'\\\\?.\'\|"\([^\\"]\|\\\\.\|\\\\\n\)*"\)'
		),
		Regex(CharStyle(eFaceBold),'#[\t ]*\([a-z]+\)',1),
		Regex(gStyleString,'#[\t ]*include[\t ]+<\([^>]+\)\>',1),
		Regex(gStyleComment,'//.*'),
		MatchPair(gStyleComment,'/*','*/'),
	)

Register.RegisterSyntax(Syntax,"SWIG","SWIG include")
